// localStorage 公共存储位置 方便管理

/**
  setLanguage 存储公共语言配置
  getLanguage 获取公共语言配置
*/
export const setLanguage = (value: any) => {
  localStorage.setItem('lz_yl_language', value);
};
export const getLanguage = () => {
  return localStorage.getItem('lz_yl_language');
};

/**
  * 获取store中的user.ts
    getLzUser 获取公共语言配置
*/
export const getLzUser = () => {
  return localStorage.getItem('lz_yl_user');
};

/**
  * 获取store中的permission.ts
    getLzPermission 获取菜单 权限配置信息
*/
export const getLzPermission = () => {
  return localStorage.getItem('lz_yl_permission');
};

/**
  * 获取自定义变量
*/
export const getCustomLocalStorage = (key) => {
  return localStorage.getItem(key);
};

/**
 * 存储自定义变量
*/
export const setCustomLocalStorage = (key: any, value: any) => {
  localStorage.setItem(key, value);
};


/**
  clearLocalStorage 清空
*/
export const clearLocalStorage = () => {
  localStorage.clear();
};

/**
  removeLocalStorage 删除某一个
*/
export const removeLocalStorage = (key: any) => {
  localStorage.removeItem(key);
};

